The present invention pertains to the field of embroidery stitching. More specifically, the present invention relates to automatic generation of embroidery designs.
The needle and thread were the early sewing tools needed for mending and repairing damaged clothing. It was then discovered that the needle could be used as an artistic tool to stitch patterns of thread that displayed colorful designs. This patterning of thread into designs has become known as the art of embroidery. Over time, embroidery designs have been displayed on various items ranging in size and complexity from simple handkerchiefs to shirts and quilts.
Just as the sewing machine has automated the task of sewing, various mechanisms have been used to automate the art of embroidery. For example, it has become known that a computer can be used to assist or aid in the generation of embroidery designs. Typically an embroidery design is recreated from a pattern that is displayed on paper. However, when a computer is used to create an embroidery design, many factors must be considered in order to produce an accurate interpretation of the pattern. Factors such as color contrast, line thickness and general object recognition, which are easily identifiable by the human eye are sometimes not easily interpreted by a computer.
Currently, embroidery may be produced using a motorized sewing mechanism combined with a synchronized movable frame that holds material to be embroidered underneath the sewing needle. Specifically, as the sewing needle is moved up and down, the movable frame may be precisely shifted in x,y coordinate space via two stepping motors that are directed by a special purpose microcontroller. Thus, the length and direction of each stitch is specified by the x,y position of the frame at the time each of the two needle penetrations that compose the stitch are made. In this way, various types of stitching may be recreated at arbitrary locations on material within the frame. Embroidery data used as input to such a machine typically consists of a series of x,y coordinates specifying the locations at which stitches (i.e., needle penetrations) should be placed. This type of embroidery data may be very difficult and tedious for a human operator to specify by hand. Hence, many CAD (computer-aided design) packages have been created to aid in the embroidery data creation process. Typically, these systems define simple high-level primitives that may be used to generate large groups of individual stitches by simply specifying only a few key points. For example, a set of zig-zag or satin stitches may be specified by setting a stitch density value and providing four points that define a bounding polygon for the stitches. This is illustrated in FIG. 12a. Similarly, large areas may be filled using parallel rows of continuous stitching by simply specifying the boundaries of those areas as illustrated in FIG. 12b. However, as design complexity grows, even using these high-level primitives to define embroidery data becomes time consuming and tedious. Additionally, the user of such embroidery data generation systems must have expert knowledge in terms of understanding and being able to apply these high-level embroidery data primitives. Thus, the focus of the present invention is to provide a means of automatically generating information from scanned images that correctly specifies high-level primitives and their required data points such that the original scanned image may be directly converted to embroidery design data. Furthermore, the automation of this process should allow the conversion to be fast while not requiring any expertise on the part of the user.
Computer systems have been developed for generating specific types of embroidery designs. For example, U.S. Pat. No. 5,510,994 describes a system that allows a pattern to be scanned into a computer. When patterns are scanned into the computer, the scanner creates a file which depicts the characteristics of the scanned image. Once the file is created, these systems require human manipulation of the image to identify and distinguish its certain characteristics. For example, the user provides the outline in the image. This method of generating embroidery designs is not fully automated, since human manipulation of the image is required to ensure its accuracy. As a result of the required human interaction, this method of generating designs is inefficient and cumbersome.
A particular embroidery pattern cannot ever conform to any particular characteristics. Each pattern contains unique characteristics such as size and color. Depending upon how complex the pattern is, the human interaction required to interpret the scanned image may be significant, which thereby hampers the efficiency of the system.
U.S. Pat. No. 5,740,056 describes a method and device for producing embroidery data that also uses image data that has been scanned into a file. The file is read by the embroidery data producing device to produce an embroidered stitch representation of the image whose data is stored in that file. However, this system has many limitations. First, the input image must be limited to very simple black and white line art. There is no provision for color images or complex black and white line art containing one or more areas of singularity. Also, no effort is made to remove or reduce noise that may be present within the scanned image. These factors severely limit the type of artwork that may serve as input to the system. Additionally, the description of key mechanisms employed by the system detail serious faults that may cause the system to produce erroneous results. For example, the means by which the system derives thickness information pertaining to contiguous objects within an image is incorrect. Specifically, this means of computation could erroneously indicate that objects are substantially and arbitrarily thicker than they are in actuality. To contrast this, in the present invention, the methods employed here to provide thickness information utilize well-researched integer distance transform algorithms that guarantee accurate thickness approximation bounded by known percentage errors. Also, the prior art invention does not consider exterior contour or edge information during the embroidery generation process. Hence, additional detail is lost relative to the original scanned image that further reduces the quality and accuracy of the resultant embroidery data. Finally, no method is provided for detecting, converting, or generating embroidery data for complex objects that are not classifiable as either thin or thick lines. Thus, the present invention, while within the same field, is a substantially different and more capable system.
As the complexity of items that require embroidery increases, the need for better mechanisms for automatically generating embroidery designs from a pattern becomes more apparent. To the extent that a mechanism cannot efficiently and accurately interpret intricate scanned patterns into embroidery designs, the ability to automate embroidery stitching is impaired.
In accordance with a preferred embodiment of the present invention, a method and apparatus for automatically generating embroidery design data from a scanned image is provided. The preferred embodiment of the present invention includes an embroidery generating mechanism which automatically and efficiently generates accurate embroidery design data.
The embroidery generating mechanism first reads a file, herein referred to as image data. The image data contains bitmapping information generated from a software scanning tool, the information being related to an embroidery pattern that is to be generated. The scanned pattern is broken up into pixels, each pixel in the scanned image having an associated color value.
The embroidery generating mechanism includes a segmentation mechanism and a chain-coding mechanism which perform operations to enhance the quality of the bitmapped information and to separate regions of the scanned image into objects. A distance transform (DT) evaluation mechanism also included within the embroidery generating mechanism classifies each object as being either a thick object or a thin, predominantly regular object. The term regular is used to describe a region that is not singular. Typically, a regular region may be characterized as a contiguous region with a relatively constant thickness along a clear unobstructed path. As an example, the strokes of a character could be described as a set of regular regions joined by singularities present at points where strokes touch or intersect with each other. A more thorough discussion of regularities and singularities may be found in image processing literature.
If the DT evaluation mechanism determines that an object is thick or irregular, the DT computation mechanism executes a line fitting mechanism, a stitch angle determination mechanism, a fragment generation mechanism, a generational path mechanism and finally an embroidery data output mechanism.
Conversely, if the DT evaluation mechanism determines that an object is a thin, predominantly regular object, the DT evaluation mechanism executes a fitting mechanism, a labeling mechanism, a merging mechanism, a coding mechanism, a column smoothing mechanism, a path generation mechanism and finally the embroidery output mechanism.
When the embroidery output mechanism executes, the mechanism has access to all output data needed for creating an embroidery design that is equivalent to the scanned pattern. The present invention provides a completely automated, efficient and accurate method for generating embroidery data from a scanned image.